﻿

namespace System.Extensions
{
  using System;

  /// <summary>
  /// Extension methods for an <see cref="Object"/>.
  /// </summary>
  public static class ObjectExtensions
  {
    /// <summary>
    /// Inidicates whether the specified <see cref="Object"/> is null or <see cref="DBNull"/>.
    /// </summary>
    /// <param name="value">The <see cref="Object"/> to check.</param>
    /// <returns><b>True</b> if null or <see cref="DBNull"/>, <b>false</b> otherwise.</returns>
    public static bool IsNullOrDBNull(this object value)
    {
      return value == null || Convert.IsDBNull(value);
    }
  }
}
